Repository navigation
fix(robot): update link scene-node transforms without the compiled extension - #947
Merged
Merged
Conversation
…tension Robot_link_T was a no-op when the C extension was absent, commented 'visualisation only'. The scene-node transforms also place the collision geometry, so on the pure-Python wheel (JupyterLite, Pyodide) iscollided and closest_point ran against geometry frozen at the initial pose: Panda link 3 stayed at z=-0.145 instead of (-0.093, 0, 0.635) at qr. The fallback now evaluates each link's ETS in Python into the scene node's own array, as the C++ does, and handles a link with no elementary transforms and a gripper with no joints. Callers pass each link's ETS data, as ETS_fkine already does. Fixes ELink/ERobot test_dist, test_collided2 and test_fkine_geometry_matches_scene_graph on the pure path, and adds a test that chains the scene-node transforms and compares them with fkine. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Up to standards ✅🟢 Issues
|
| Metric | Results |
|---|---|
| Complexity | 4 |
| Duplication | 0 |
NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
fknm.Robot_link_Tupdates the scene-node transform of every link of a robot. Without the compiled extension it did nothing, with the comment "visualisation only". But those transforms also place the collision geometry, so on the pure-Python wheel (JupyterLite, Pyodide)iscollidedandclosest_pointran against geometry frozen at the initial pose. For example, atqrthe Panda's link 3 stayed at z = -0.145 instead of (-0.093, 0, 0.635).The Python path now evaluates each link's ETS into the scene node's own array, as the C++ does. It handles a link with no elementary transforms (such as a URDF base link) and a gripper with no joints. The two callers pass each link's ETS data, the same way
ETS_fkinealready does.Found by the new pure-Python coverage leg in #946, which failed
test_dist(ELink and ERobot),test_collided2andtest_fkine_geometry_matches_scene_graph.Refs #898.
Behaviour
This changes numerical results on the pure-Python path only: collision and distance queries are now correct there. The compiled path is untouched.
What I ran, and what I could not
test_blocks.py) went from 19 failures to 15. The 15 are compiled-only tests and one chaotic IK test, which are separate and not part of this PR.TestRobotLinkTReferenceintests/test_fknm_fallback.pychains the scene-node transforms up the tree and compares them withfkineat two configurations. It fails 18 times onmain's code and passes with this change.ets.eval: no mismatches.ETS([]).eval()andfkine(end=<base link>)raiseIndexErroron the pure path. That is a separate bug, so the new test skips links with no elementary transforms.AI assistance
Written with Claude Code (Claude Sonnet 5.5), reviewed by the maintainer.
🤖 Generated with Claude Code